package com.yashi.springmvcjbpm.service.impl;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import com.yashi.springmvcjbpm.dao.impl.StaffDAOImpl;



@Service("LoginService")
@Repository
public class LoginServiceImpl{
	
	private StaffDAOImpl staffDAO = new StaffDAOImpl();
	
	public boolean isLogin(String staffName, String staffPsw) {
		String queryString ="select * from Staff as model where model.staffName='"+staffName+"' and model.staffPsw='"+staffPsw+"'";
		return staffDAO.findStaff(queryString).size()==1?true:false;
	}
	
}
